<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" onclick="screenEvent()">
<!--screen.height 屏幕高度-->
<!--screen.width 屏幕宽度-->
<!--  availHeight 获取出去任务栏的高度 宽度同理 -->
</body>
<script>
    function screenEvent() {
        alert('高 ：' + screen.height + '宽 ：' + screen.width)
    }
</script>
</html>